<h1>编辑学生信息</h1>

<% form_for(@student) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :sname, "姓名：" %><br />
    <%= f.text_field :sname %>
  </p>
  <p>
    <%= f.label :spassword, "密码：" %><br />
    <%= f.text_field :spassword %>
  </p>
  <p>
    <%= f.label :stype, "类型：" %><br />
    <%= f.text_field :stype %>
  </p>
  <p>
    <%= f.label :sresume, "简介：" %><br />
    <%= f.text_area :sresume %>
  </p>
  <p>
    <%= f.submit "更新" %>&nbsp;
    <%= link_to '显示', @student %>
    <% if !(session[:student_id]) -%>
    |<%= link_to '返回', students_path %>
    <% end -%>
  </p>
<% end %>


